<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>郎思科技后台管理系统</title>
<link rel="stylesheet" href="css/guide.css" type="text/css" />
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
	$(function(){
		$('.login_button').click(function(){
			var u = $('#username');
			var p = $('#password');
			if (!u.val()) {
				$('.login_error').html("用户名不能为空");
				u.focus();
				return false;
			}
			$('.login_error').html("");
			if (!p.val()) {
				$('.login_error').html("密码不能为空");
				p.focus();
				return false;
			}
			$('.login_error').html("");
			$.ajax({
				url:"login_login.action",
				type:"post",
				data:{
					"username": u.val(),
					"password": p.val()
				},
				success : function(data){
					if ('EC001' == data) {
						alert("登录成功！");
						window.location.href="login_show.action";
					} else {
						alert("很抱歉，登录失败!");
					}		
				}
			})
			
			
		});
		
		
			
		})
				
		

</script>

</head>
<body>
	<div class="login_all">
    	<div class="build_index">
            <div class="login_all_content">
                <div class="login_index">
					
                    <div class="login_index_left">
                        <img src="images/login_img.png" />
                    </div>
                    <div class="login_index_right">
                        <p class="login_title">系统登陆</p>
                        <div class="index_input">
                            <div class="login_error"></div>
                            <div class="login_name">
                                <label>用户名：</label>
                                <div class="login_text">
                                    <span class="write_word" id="write_username"></span>
                                    <input type="text" id="username" name="username"/>
                                </div>
                            </div>
                            <div class="login_name">
                                <label>密码：</label>
                                <div class="login_text">
                                    <span class="write_word" id="write_password"></span>
                                    <input type="password" id="password" name="password" />
                                </div>
                            </div>
                            <a href="#" class="login_button" >登录</a>	
                        </div><!--index_input-->
                        <div class="foot_login">
                            <p>Copyright @朗思科技</p>
                        </div>
                    </div>
                    <div class="clr"></div>
                </div><!--login_index-->
            </div><!--login_all_content-->
           </div><!--login_all-->
	</div><!--login_all-->
    
</body>
</html>